package com.kang.mavenweb.service;


import com.kang.mavenweb.dao.IBookDao;
import com.kang.mavenweb.domain.Book;
import com.kang.mavenweb.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements IBookService {

    @Autowired
    private IBookDao bookDao;

    @Override
    public void add(Book book, User user) {
        bookDao.add (book, user);
    }

    @Override
    public List<Book> findByUser(int id) {
        return bookDao.findByUser (id);
    }
}
